import request from '@/util/request'

export const userAdd = (data: any) => {
  return request({
    url: '/user',
    method: 'POST',
    data: data
  })
}
export const userRemove = (id: number) => {
  return request({
    url: '/user',
    method: 'DELETE',
    params: {
      id: id
    }
  })
}
export const userModify = (data: any) => {
  return request({
    url: '/user',
    method: 'PUT',
    data: data
  })
}
export const userFind = (data: any, pageInfo: any) => {
  return request({
    url: '/user/list',
    method: 'GET',
    params: {
      ...data, ...pageInfo
    }
  })
}
export const userFindById = (id: number) => {
  return request({
    url: '/user',
    method: 'GET',
    params: {
      id: id
    }
  })
}
export const userResetPassword = (id: number) => {
  return request({
    url: '/user/resetPassword',
    method: 'GET',
    params: {
      id: id
    }
  })
}


